package com.happy.seatwork;

import java.util.Scanner;

public class palindromic_number {
    public static void main(String args[]){
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入一个字符串");
        String str = scanner.next();
        int j = 1;
        for(int i = 0; i < str.length() / 2; i++){
            if (str.charAt(i) != str.charAt(str.length() -  i -1)){
                j = 0;
            }
        }
        if (j == 1){
            System.out.println(str + "是回文数");
        }
        else{
            System.out.println(str + "不是回文数");
        }
    }
}
